home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-01-18 | 2.1 KB | 65 lines | [TEXT/MMCC] |
- //
- // CTCPSessionDocPP.h
- //
- // TurboTCP library
- // TCP session document
- // PowerPlant-specific class
- //
- // Copyright © 1993-95, FrostByte Design / Eric Scouten
- //
-
- #pragma once
-
- #include "TurboTCP.buildflags.h"
-
- #if !TurboTCP_PP
- #error: This file should be used with PowerPlant projects only!
- #endif
-
- #include "CTCPEndpoint.h"
- #include <LSingleDoc.h>
-
-
- //***********************************************************
-
- class CTCPSessionDocPP : public LSingleDoc, public CTCPEndpoint {
-
- // This abstract class is provided to link the PowerPlant LSingleDoc class with the TurboTCP
- // CTCPStream class. View this as a “connection session” document; this is the point at
- // which the user interaction with the TCP session is handled.
-
- // This class provides all of the necessary behaviors for opening and closing a session.
- // It provides abstract methods for receiving data and handling various TCP notifications.
- // By default, it sets the window title to the name of the remote host. You may also
- // configure it to show the document’s filename, both hostname & filename, or neither.
- // (See the fields showFileName and showHostName and the method AutoTitle.
-
- // This class does not implement any specific TCP protocol. You will need to subclass it
- // to provide the behaviors specific to the protocol you are implementing. You may want
- // to examine and use the CTelnetTerminal class in MiniTelnet to see how this may be done.
-
-
- public:
- CTCPSessionDocPP(LCommander* inSuper,
- unsigned short theDefaultPort,
- unsigned long recBufferSize = recReceiveSize,
- unsigned short autoReceiveSize = recAutoRecSize,
- unsigned short autoReceiveNum = recAutoRecNum,
- Boolean doUseCName = true);
- CTCPSessionDocPP(unsigned short theDefaultPort,
- unsigned long recBufferSize = recReceiveSize,
- unsigned short autoReceiveSize = recAutoRecSize,
- unsigned short autoReceiveNum = recAutoRecNum,
- Boolean doUseCName = true);
-
- // closing windows & sessions
-
- virtual void AttemptClose(Boolean inRecordIt);
- virtual void RemoteClose();
-
- // window titling
-
- virtual void GetFileName(Str255 theName);
- virtual void SetWindowTitle(Str255 newTitle);
-
- };